#include<bits/stdc++.h>
using namespace std;
inline int read()
{
    char c = getchar();
    int x = 0;
    bool flag = false;
    while(c < '0' || c > '9') c = getchar();
    while(c >= '0' && c <= '9')
    {
        x = (x << 3) + (x << 1) + int(c-'0');
        c = getchar();
    }
    return x;
}
const int N = 1e5+5;
int n,ans,r[N];
bool used[N],out[N];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    n = read();
    for(int i = 1;i <= n;i++) r[i] = read();
    sort(r+1,r+n+1);
    int l = 1,ri = 2;
    while(l <= n && ri <= n)
    {
        if(r[ri] > r[l])
        {
            ++l; ++ri;
            out[l] = 1;
            out[l] = used[l] = used[ri] = 1;
        }else ++ri;
    }
    for(int i = 1;i <= n;i++)
        if(!out[i])
            ans++;
    printf("%d\n",ans);
    return 0;
}
